import React from 'react';
import Modal from '../../Modal';
import { TxtExportType } from '../../../types';

interface ExportTxtModalProps {
    isOpen: boolean;
    onClose: () => void;
    handleExportTxt: (type: TxtExportType) => void;
    handleExportStatusTxt: () => void;
}

const ExportTxtModal: React.FC<ExportTxtModalProps> = ({ isOpen, onClose, handleExportTxt, handleExportStatusTxt }) => {
    return (
        <Modal isOpen={isOpen} onClose={onClose} title="导出为纯文本 (.txt)">
            <div className="space-y-4">
                <p>请选择要导出的内容：</p>
                <div className="flex flex-col space-y-3">
                    <button onClick={() => handleExportTxt('narrative')} className="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded text-white transition-colors">仅导出游戏叙事</button>
                    <button onClick={() => handleExportTxt('keyInfo')} className="px-4 py-2 bg-green-600 hover:bg-green-700 rounded text-white transition-colors">仅导出关键信息</button>
                    <button onClick={() => handleExportTxt('both')} className="px-4 py-2 bg-purple-600 hover:bg-purple-700 rounded text-white transition-colors">导出叙事与关键信息</button>
                    <button onClick={handleExportStatusTxt} className="px-4 py-2 bg-teal-600 hover:bg-teal-700 rounded text-white transition-colors">导出当前状态栏</button>
                </div>
            </div>
        </Modal>
    );
};

export default ExportTxtModal;
